<template>
    <p class="tabs-p" v-if="radio1=='试题管理'">题库用于对试题进行分类管理，请在以下列表中管理您的题库</p>
    <p class="tabs-p" v-else-if="radio1=='创建试题'">填写下面的表单，创建一个新的题库</p>
    <p class="tabs-p" v-else-if="radio1=='导入试题'">在下列表单中批量导入试题</p>
    <p class="tabs-p" v-else>在下面的表单中修改题库信息</p>
       <el-radio-group v-model="radio1" size="small" 
          style="margin-bottom: 20px;"
          fill="#1C84C6" 
          @change="changeRadio">
        <el-radio-group v-model="radio1" />
          <el-radio-button label="试题管理" value="试题管理"/>
          <el-radio-button label="导入试题"  value="导入试题"/>
        </el-radio-group>
        <MyTestQuestionk v-if="radio1=='试题管理'" @send-row-data="getRowData"></MyTestQuestionk>
        <ExportQuestion v-else-if="radio1=='导入试题'"  ></ExportQuestion>
        <CreateTestQuestion v-else :rowData="rowData" ></CreateTestQuestion>
       

</template>

<script setup>
import MyTestQuestionk from './MyTestQuestionk.vue';
import CreateTestQuestion from './CreateTestQuestion.vue';
import ExportQuestion from './ExportQuestion.vue';
import { ref } from 'vue'
const radio1 = ref('试题管理')
// const emit  = defineEmits(['changeRadio'])
const changeRadio = ()=>{
  // emit('changeRadio',radio1.value)
  console.log(radio1,'radio....')
  rowData.value=''
}
// 获取修改的数据
const rowData = ref()
const getRowData=(row)=>{
  console.log(row,'<<<F')
  rowData.value= row
  radio1.value=''
}
</script >
<style lang="less" scoped>
.tabs-p{
  margin: 0px 0px 20px;
  color: #AAAAAA;
}
</style>